<!DOCTYPE html>
<html lang="zh-CN" xmlns:th="http://www.w3.org/1999/xhtml">
<html lang="zh-CN">
<head>
    <script type="text/javascript" th:src="@{https://cdn.bootcss.com/jquery/3.2.1/jquery.min.js}"></script>
    <link th:href="@{https://cdn.bootcss.com/bootstrap/3.3.7/css/bootstrap.min.css}" rel="stylesheet"/>
    <link th:href="@{/css/default.css}" rel="stylesheet"/>
    <link rel="icon" th:href="@{/images/favicon.ico}" type="image/x-icon"/>
    <meta charset="UTF-8"/>
    <title>用户优惠券</title>
    <style>
        .center {
            text-align:center;
        }
        table,td,th
        {
            text-align:center;
        }
    </style>
</head>

<body>

<div class="contentDiv">

    <h2 class="center"> 用户优惠券 </h2>

    <table class="table table-hover table-condensed">
        <legend>
            <strong>用户优惠券列表</strong>
        </legend>
        <thead>
        <tr>
            <th>id</th>
            <th>对应的模板 id</th>
            <th>用户 id</th>
            <th>优惠券码</th>
            <th>领取时间</th>
            <th>优惠券状态</th>
        </tr>
        </thead>
        <tbody>
        <tr th:each="coupon : ${coupons}">
            <th scope="row" th:text="${coupon.id}"></th>
            <td th:text="${coupon.templateId}"></td>
            <td th:text="${coupon.userId}"></td>
            <td th:text="${coupon.couponCode}"></td>
            <td th:text="${coupon.assignTime}"></td>
            <td th:text="${coupon.status}"></td>
        </tr>
        </tbody>
    </table>

    <div class="center">
        <a class="btn btn-primary" th:href="@{/distribution/thy/template/{userId}(userId=${uid})}"
           role="button">可以领取的优惠券</a></div>
</div>

</body>
</html>
